home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / cnet / kickboxing10b.lha / Kickbox.main < prev    next >
Text File  |  1994-12-31  |  24KB  |  713 lines

  1. /* Kick-Boxing V1.0 (By: Billy The Kid) 313-422-3113 || MAIN PROGRAM */
  2.  
  3. options results
  4.  
  5. getuser 1;name=result;getuser 12;time=result
  6. wins=0;loses=0;class='Fly weight';left=5;hit=0;thit=0;trwins=0;trloses=0
  7. move=0;rou=0;str=50;mstr=0;xx=s1;s=0;l=0;pk=0;rank=0
  8.  
  9. Setup:
  10. call CHKPLR
  11. call open(file,'pfiles:Kickboxing/Fighters/'name'',"R")
  12. wins=readln(file);loses=readln(file);class=readln(file);trwins=readln(file);trloses=readln(file);str=readln(file)
  13. pk=readln(file);rank=readln(file);call close(file)
  14. call open(file,'pfiles:Kickboxing/Champ.Dat',"R")
  15. champname=readln(file);call close(file);call stats;call main
  16.  
  17. Stats:
  18. call logshorten
  19. transmit 'n1c2|| c1v01}''s boxing records c2||n1'
  20. transmit 'c7Class : c1'class'  c2--  c7Wins        : c1'wins''
  21. transmit 'c7PKicks: c1'pk'           c2--  c7Loses       : c1'loses''
  22. transmit 'c7Rank  : c1'pk'           c2--  c7Strength    : c1'str''
  23. transmit 'c5------------------------------------------'
  24. transmit 'c3   Training records: c7Wins : c1'trwins' c7Loses : 'trloses'' 
  25. transmit 'c5------------------------------------------'
  26. return
  27.  
  28. main:
  29. call classchec
  30. call gossip
  31. query "n1c5(c1Commandc5> c7"
  32. aa=result
  33. if aa = '###PANIC' then signal bye
  34. if aa = 'q' | aa = 'Q' then signal bye
  35. if aa = '1' then call train
  36. if aa = '2' then call match
  37. if aa = '3' then call multi
  38. if aa = '4' then do
  39. filen='Pfiles:Kickboxing/Fighters.List'
  40. call listtr
  41. transmit ''
  42. end
  43. if aa = '5' then call stats
  44. if aa = '6' then do
  45. if ~exists('Pfiles:Kickboxing/Fighting.News') then do
  46. transmit 'n1c5@ The news is blank at the moment'
  47. call main
  48. end
  49. sendfile "pfiles:Kickboxing/Fighting.News"
  50. end
  51. if aa = '7' then sendfile "pfiles:Kickboxing/Instructions"
  52. if aa = '8' then sendfile "Pfiles:Kickboxing/Order.info"
  53. if aa = '9' then call viewother
  54. if aa = "?" then do
  55. sendfile "pfiles:Kickboxing/Main.Menu"
  56. call main
  57. end
  58. call main
  59.  
  60. bye:
  61. transmit 'n1c3@ One moment please.'
  62. call open(file,'Pfiles:Kickboxing/Fighters/'name'',"W")
  63. call writeln file, wins;call writeln file, loses;call writeln file, class;call writeln file, trwins;call writeln file, trloses;call writeln file, str
  64. call writeln file, pk;call writeln file, rank;call close(file)
  65. if name=champname then do
  66. call open(file,'Pfiles:Kickboxing/Champ.Dat',"W")
  67. call writeln file, name;call writeln file, wins;call writeln file, loses;call writeln file, str;call close(file)
  68. end
  69. exit
  70.  
  71. gossip:
  72. randgos=random(1,2,time('s'))
  73. if randgos=1 then do
  74. randgoss=Random(1,5,time('s'))
  75. if randgoss=1 then do
  76. transmit 'n1c2@ Champion 'champname' wishes you luck on your fighting.'
  77. return
  78. end
  79. if randgoss=2 then do
  80. transmit 'n1c7@ A beat up fighters stumbles by.'
  81. return
  82. end
  83. if randgoss=3 then do
  84. if a=1 then do
  85. transmit 'n1@ A new fighter walks by you to sign up.'
  86. return
  87. end
  88. transmit 'c5n1@ 'champname' gets another victory! Wins another match!'
  89. a=1
  90. return
  91. end
  92. if randgoss=4 then return
  93. if randgoss=5 then return
  94. return
  95. end
  96. if randgos=2 then return
  97.  
  98. Train:
  99. transmit 'n1c7* Trainers you can trainer with *'
  100. filen='Pfiles:Kickboxing/Trainers.Dat';call listtr
  101. query 'n1c2Who do you wish to train with? (L=list)> '
  102. x=result
  103. if x = 'q' | x = 'Q' then call main
  104. if x = '###PANIX' then singal bye
  105. if x = '' then call main
  106. if x = 'L' | x = 'l' then do
  107. filen='Pfiles:Kickboxing/Trainers.Dat'
  108. call listtr
  109. end
  110. if x<1 | x>numplayers then call train 
  111. Filename='Pfiles:Kickboxing/Trainers/'player.x
  112. if ~exists(filename) then do
  113. transmit 'n1c3* No such trainer under that name.'
  114. call train
  115. end
  116. trainer=player.x
  117. call loadtr
  118.  
  119. ListTr:
  120. call open(player,filen,'R')
  121. x=0
  122. do until eof(player)=1
  123.  x=x+1
  124.  player.x=readln(player)
  125. end
  126. call close player
  127. Numplayers=x-1
  128. transmit ' '
  129.  do p=1 to numplayers
  130.  a=right('    c7'p,6)||'c2.c4 'player.p
  131.  sendstring left(a,49)
  132. end
  133. return
  134.  
  135. loadtr:
  136. move=0
  137. rou=0
  138. transmit 'n1c4|| c1'trainer' vs. 'name' c4||'
  139. transmit 'n1c3The will be 7 rounds, if a player is not knocked out the'
  140. transmit 'judges will decide on the winner. Take your positions. w1FIGHT!'
  141. call trmatch
  142.  
  143. trmatch:
  144.  
  145. if move=10 | move=20 | move=30 | move=40 | move=50 | move=60 | move=70 then do
  146. rou=rou+1
  147. if rou ~=7 then do
  148. transmit 'f1c3b1w1b1ROUND 'rou' over! Now for the next round!'
  149. if thits < hits then transmit 'n1c7'trainer' is winning!'
  150. if hits < thits then transmit 'n1c7You are winning the match!w2'
  151. move=move+1
  152. end
  153. if rou=7 then do 
  154. transmit 'b1w1b1f1c2@ Judges are deciding on the winner.'
  155. if thits < hits then do
  156. transmit 'The winner is z6c3 'trainer' z0'
  157. trloses=trloses+1
  158. end
  159. if hits < thits then do
  160. transmit 'The winner is z6c3 YOU! z0'
  161. trwins=trwins+1
  162. str=str+5
  163. end
  164. transmit 'n1c5Fighting totals:n2c2Computer hit you: 'thit' times'
  165. transmit 'n1c2You hit the computer: 'hit' times'
  166. if pk=2 then do
  167. transmit 'n1c4@ You have your maximum power kick points.';call main;end
  168. pk=pk+1
  169. transmit 'n1c4@ You are awarded 1 extra power kick point!';call main;end
  170. end
  171. query 'n1c4Enter Move (L=List of moves)> '
  172. bb=result
  173. if bb = 'Q' | bb= 'q' then call main
  174. if bb = '###PANIC' then signal bye
  175. if bb = 'L' | bb = 'l' then do
  176. sendfile "pfiles:Kickboxing/Trainer.menu"
  177. call trmatch
  178. end
  179. if bb = "1" then do
  180. transmit 'f1'
  181. randkick=random(1,3,time('s'))
  182. if randkick=1 then do
  183. transmit 'c7@ You throw a blow to 'trainer'''s face and hit!'
  184. hit=hit+1
  185. end
  186. if randkick=2 then do
  187. transmit 'c7@ You throw a blow to 'trainer'''s face and he blocks!'
  188. end
  189. if randkick=3 then do
  190. transmit 'c7@ You throw a blow to 'trainer'''s face and hit!'
  191. hit=hit+1
  192. end
  193. move=move+1
  194. call trfight
  195. end
  196. if bb = "2" then do
  197. transmit 'f1'
  198. randkick2=random(1,3,time('s'))
  199. if randkick2=1 then do
  200. transmit 'c4@ You kick at 'trainer'''s side and miss!'
  201. end
  202. if randkick2=2 then do
  203. transmit 'c4@ You kick at 'trainer'''s side and hit!'
  204. hit=hit+1
  205. end
  206. if randkick2=3 then do
  207. transmit 'c4@ You kick at 'trainer'''s side and hit!'
  208. hit=hit+1
  209. end
  210. move=move+1
  211. call trfight
  212. end 
  213. if bb = "3" then do
  214. transmit 'f1'
  215. randkick3=random(1,3,time('s'))
  216. if randkick3=1 then do
  217. transmit 'c1@ You sweep at 'trainer'''s legs and hit!'
  218. hit=hit+1
  219. end
  220. if randkick3=2 then do
  221. transmit 'c1@ You sweep at 'trainer'''s legs and miss!'
  222. end
  223. if randkick3=3 then do
  224. transmit 'c1@ You sweep at 'trainer'''s legs and hit!'
  225. hit=hit+1
  226. end
  227. move=move+1
  228. call trfight
  229. end
  230. if bb = "4" then do
  231. transmit 'f1'
  232. transmit 'c5@ You attempt a face block to 'trainer''
  233. block=1
  234. move=move+1
  235. call trfight
  236. end
  237. if bb = "5" then do
  238. transmit 'f1'
  239. transmit 'c5@ You attempt a waist block.'
  240. block=2
  241. move=move+1
  242. call trfight
  243. end
  244. call trmatch
  245.  
  246. trfight:
  247. randcomp=random(1,5,time('s'))
  248. if randcomp=1 then do
  249. transmit 'n1c2* 'trainer' throws a kick at you and strikes!'
  250. thit=thit+1
  251. end
  252. if randcomp=2 then do
  253. transmit 'n1c2* 'trainer' throws and punch misses!'
  254. hit=hit+1
  255. end
  256. if randcomp=3 then do
  257. transmit 'n1c2* 'trainer' attempts a jump kick and fails!'
  258. hit=hit+1
  259. end
  260. if randcomp=4 then do
  261. transmit 'n1c2* 'trainer' does a jump kick and strikes!'
  262. thit=thit+1
  263. end
  264. if randcomp=5 then do
  265. if block=1 then transmit 'n1c2* 'trainer' kick at your face but you block.'
  266. if block=0 then transmit 'n1c2* 'trainer' kick you in the face.'
  267. block=0
  268. end
  269. if randcomp=6 then do
  270. if block=2 then transmit 'n1c2* 'trainer' kick at your waist but you block.'
  271. if block=0 then transmit 'n1c2* 'trainer' kicks you in the waist.'
  272. block=0
  273. end
  274. call trmatch
  275.  
  276. multi:
  277. GETUSER 23;UserPort=result;GETUSER 1;UserName=result
  278. do i=1 to 16;call setclip("Move"||i);end
  279. ac.1.1=1;ac.1.2=1;ac.1.3=1;ac.1.4=2;ac.1.5=1;ac.1.6=0;ac.2.1=1;ac.2.2=1;ac.2.3=1;ac.2.4=0;ac.2.5=0;ac.2.6=2;ac.3.1=1;ac.3.2=1
  280. ac.3.3=1;ac.3.4=1;ac.3.5=1;ac.3.6=0;ac.4.1=0;ac.4.2=0;ac.4.3=0;ac.4.4=0;ac.4.5=0;ac.4.6=0;ac.5.1=0;ac.5.2=0;ac.5.3=0;ac.5.4=0
  281. ac.5.5=0;ac.5.6=0;ac.6.1=0;ac.6.2=0;ac.6.3=0;ac.6.4=0;ac.6.5=0;ac.6.6=0;Move.1.0="jump kicks.";Move.1.1="You jump kick."
  282. Move.2.0="side kicks.";Move.2.1="@ You side kick.";Move.3.0="punchs.";Move.3.1="@ You punch.";Move.4.0="blocks face."
  283. Move.4.1="@ You block your face.";Move.5.0="blocks waist.";Move.5.1="@ You block you waist.";Move.6.0="dodges.";Move.6.1="@ You dodge.";r0.0="does no damage!"
  284. r1.0="@ You did no damage!";r0.1="hits you for 1 point!";r1.1="@ You hit for 1 point!";r0.2="hits you for 2 points!"
  285. r1.2="@ You hit for 2 points!"
  286.  
  287. BEGIN:
  288. Transmit "n1c7Kick-Boxing Multin1";call CHKPLR
  289. Transmit "1. Call an user online to play game"
  290. Transmit "2. Look who is online"
  291. Transmit "3. Quit to boxing main"
  292. sendstring "n1c2Command> ";ans=CHECKCHAR("123");if ans="2" then signal LIST;if ans="1" then signal CALLU;if ans="3" then signal ExitKB;signal BEGIN
  293.  
  294. LIST:
  295. transmit 'n1';BBSCOMMAND WH;call ANYKEY;signal BEGIN
  296.  
  297. CALLU:
  298. transmit 'n1';BBSCOMMAND WH;BBSCOMMAND OLM;call ANYKEY;call setclip("There","waiting")
  299. call setclip("WPort",UserPort);call WAIT2
  300.  
  301. WAIT:
  302. Transmit "n21. Quit";Transmit "2. Continue to wait";Transmit "3. Call another player"
  303. Transmit "n1Command> ";ans=CHECKCHAR("123");if ans="1" then signal ExitKB;if ans="2" then signal WAIT2;if ans="3" then do
  304. BBSCOMMAND WH;call ANYKEY;end;signal WAIT
  305.  
  306. WAIT2:
  307. sendstring "n1c7Waitingc1";do i=1 to 15;sendstring ".w1";call setclip("CPort",UserPort);a=getclip("There")
  308. if a="Here!" then do;OtherPort=getclip("RPort");signal START;end;end;signal WAIT
  309.  
  310. CHKPLR:
  311. do i=1 to 25;a=getclip("There");if a="waiting" then do;b=getclip(WPort);if b=UserPort then iterate
  312. call setclip("There","Here!");call setclip("RPort",UserPort);OtherPort=getclip("CPort");transmit 'n1z6c3MULTI USER MODE ACTIVEz0';signal START;end;end;return
  313.  
  314. START:;HP=10;OHP=10
  315.  
  316. GAME:
  317. Transmit "n1c7Hit Points: c1"HP
  318. Transmit "n11. Jump kick"
  319. Transmit "2. Kick to side"
  320. Transmit "3. Throw a punch to face"
  321. Transmit "4. Block a face blow"
  322. Transmit "5. Block a waist blow"
  323. Transmit "6. Try to dodge a punch"
  324. Transmit "7. Quit to boxing main"
  325. sendstring "n1c3Command> ";ans=CHECKCHAR("1234567");Transmit "Waiting for other player.";signal ACTION
  326.  
  327. ACTION:
  328. act=ans;call ACTWAIT;call setclip("Move"||OtherPort);if act="7" then call exitkb;if OAct="Q" then exit;call React(act,OAct);signal GAME
  329.  
  330. REACT:
  331. transmit 'f1'
  332. res1=ac.Act.OAct;res0=ac.OAct.Act;Transmit ""||Move.Act.1;Transmit "* Your opponent "||Move.OAct.0;Transmit r1.res1
  333. Transmit "* Your opponent "||r0.res0;HP=HP-res0;OHP=OHP-res1;if HP<1 then do;Transmit 'c4@ You have lost!';exitkb;end
  334. if OHP<1 then do;Transmit "c4@ You have won!";call exitkb;end;return
  335.  
  336. ACTWAIT:
  337. i=0;call setclip("Move"||UserPort,act);do forever;i=i+1;if i//500=0 then do
  338. Sendstring "c3Continue to wait c7(c1Yc7/c3nc7)c3?";bufferflush;getchar;if result="N" then do;Transmit "No."
  339. signal ExitKB;end;Transmit "Yes.n1";end;OAct=getclip("Move"||OtherPort);if Oact="" then iterate;return;end
  340.  
  341. CHECKCHAR:
  342. arg PAns;bufferflush;do until pos(Qans,PAns)~=0;getuser 7;if result <1 then ExitDPA;;getchar;Qans=result
  343. ;getcarrier;if result="FALSE" then signal ExitKB;end;return Qans
  344.  
  345. ExitKB:
  346. Transmit "Exiting to main";act="7";call setclip("Move"||UserPort,act);call main
  347.  
  348. ANYKEY:
  349. BufferFlush;Sendstring "n1c3[c7Press any keyc3]g1n1";return
  350.  
  351. ERROR:;SYNTAX:
  352. line="Kickbox.main Error, Line" sigl ";" errortext(rc);Transmit "n3c1"line;LOGENTRY line;exit
  353.  
  354. Match:
  355. if name=champname then do
  356. transmit 'n1c6@ You are the current champion, you can''t fight anyone else.'
  357. call main;end
  358. move=0;str!=str;rou=0
  359. transmit 'n1c7Lets find you a fighter to kick box with.'
  360. if wins=0 then do;transmit 'n1c3You will be fighting c1Glass Joe';mname='Glass Joe';sname='Pfiles:Kickboxing/Match/Glass Joe';call getmatch;end
  361. if wins=1 then do;transmit 'n1c3You will be fighting c1Slick Kick';mname='Slick Kick';sname='Pfiles:Kickboxing/Match/Slick Kick';call getmatch;end
  362. if wins=2 then do;transmit 'n1c3You will be fighting c1Fresh Kid';mname='Fresh Kid';sname='Pfiles:Kickboxing/Match/Fresh Kid';call getmatch;end
  363. if wins=3 then do;transmit 'n1c3You will be fighting c1Generis One';mname='Generis One';sname='Pfiles:Kickboxing/Match/Generis One';call getmatch;end
  364. if wins=4 then do;transmit 'n1c3You will be fighting c1Kid Ice';mname='Kid Ice';sname='Pfiles:Kickboxing/Match/Kid Ice';call getmatch;end
  365. if wins=5 then do;transmit 'n1c3You will be fighting c1Sub-Zero';mname='Sub-Zero';sname='Pfiles:Kickboxing/Match/Sub-Zero';call getmatch;end
  366. if wins=6 then do;transmit 'n1c3You will be fighting c1The Sandman';mname='The Sandman';sname='Pfiles:Kickboxing/Match/The Sandman';call getmatch;end
  367. if wins=7 then do;transmit 'n1c3You will be fighting c1Side Kick';mname='Side Kick';sname='Pfiles:Kickboxing/Match/Side Kick';call getmatch;end
  368. if wins=8 then do;transmit 'n1c3You will be fighting c1Big Bogie';mname='Big Bogie';sname='Pfiles:Kickboxing/Match/Big Bogie';call getmatch;end
  369. if wins=9 then do;transmit 'n1c3You will be fighting c1Sweet Move';mname='Sweet Move';sname='Pfiles:Kickboxing/Match/Sweet Move';call getmatch;end
  370. if wins=10 then do;transmit 'n1c3You will be fighting c1King Fist';mname='King Fist';sname='Pfiles:kickboxing/match/King Fist';call getmatch;end
  371. if wins=11 then do;transmit 'n1c3You will be fighting c1Cruel Kid';mname='Cruel Kid';sname='Pfiles:kickboxing/match/Cruel Kid';call getmatch;end
  372. if wins=12 then do;transmit 'n1c3You will be fighting c1Little Mac';mname='Little Mac';sname='Pfiles:kickboxing/match/Little Mac';call getmatch;end
  373. if wins=13 then do;transmit 'n1c3You will be fighting c1Direct Hit';mname='Direct Hit';sname='Pfiles:Kickboxing/Match/Direct Hit';call getmatch;end
  374. if wins=14 then do;transmit 'n1c3You will be fighting c1Fast Reflex';mname='Fast Reflex';sname='Pfiles:Kickboxing/Match/Fast Reflex';call getmatch;end
  375. if wins=15 then do;transmit 'n1c3You will be fighting c1Killer Kick';mname='Killer Kick';sname='Pfiles:Kickboxing/Match/Killer Kick';call getmatch;end
  376. if wins=16 then do;transmit 'n1c3You will be fighting c1Deadly Blow';mname='Deadly Blow';sname='Pfiles:Kickboxing/Match/Deadly Blow';call getmatch;end
  377. if wins=17 then do;transmit 'n1c3You will be fighting c1Marvelious Kick';mname='Marvelious Kick';sname='Pfiles:Kickboxing/Match/Marvelious Kick';call getmatch;end
  378. if wins=18 then do;transmit 'n1c3You will be fighting c1Hard Hit';mname='Hard Hit';sname='Pfiles:Kickboxing/Match/Hard Hit';call getmatch;end
  379. if wins=19 then do;transmit 'n1c3You will be fighting c1Steel Swing';mname='Steel Swing';sname='Pfiles:Kickboxing/Match/Steel Swing';call getmatch;end
  380. if wins=20 then do;transmit 'n1c3* c7You must now fight the champion c1'champ'';call getchamp;end
  381.  
  382. Mstart:
  383. transmit 'n1'saying''
  384. transmit 'n1c7'mname'''s recordes:n2c4Wins: 'mwins'n1Loses : 'mloses''
  385. Query 'n1c5Are you ready for this match? '
  386. a=upper(result)
  387. if a = "Y" then call MMatch
  388. if a = "N" then do
  389. transmit 'n1c5'mname' says, "Haha! You quiter! You will never win!'
  390. call main
  391. end
  392. call Mstart
  393.  
  394. Getmatch:
  395. call open(file,sname,'R')
  396. mwins=readln(file);mloses=readln(file);mstr=readln(file);saying=readln(file)
  397. call close(file)
  398. call Mstart
  399.  
  400. MMatch:
  401. mstr!=mstr
  402. transmit 'n1c3Get ready for your fight! The only way to forfit is to hit "Q"'
  403. transmit 'That will lead you to a loss. Fight the best you can, get ready'
  404. transmit 'Take your stances, Fight.'
  405.  
  406. MMatch!:
  407. if mstr! < 0 then do
  408. transmit 'n1c5@ You have knocked 'mname' out cold! You are the winner!w1'
  409. wins=wins+1
  410. call news
  411. call main
  412. end
  413. if str! < 0 then do
  414. transmit 'n1c5@ You have been knocked out! You have lost the fight!'
  415. loses=loses+1
  416. call losesave
  417. call main
  418. end
  419. if rou=10 then do
  420. transmit 'n1c3@ End of match, judges are deciding the winner!'
  421. if str! > mstr! then do
  422. transmit 'n1@ You win the match! Congratulations!'
  423. wins=wins+1
  424. call news
  425. call main
  426. end
  427. if mstr! > str! then do
  428. transmit 'n1c3* You lose the match, train more!'
  429. wins=wins+1
  430. call losesave
  431. call main
  432. end
  433. end
  434. if move=10 | move=20 | move=30 | move=40 | move=50 | move=60 | move=70 | move=80 | move=90 | move = 100 then do
  435. rou=rou+1
  436. transmit 'f1b1Round 'rou' over! Now for next round!w1b1'
  437. move=move+1
  438. end
  439. if rou=10 then call mmatch!
  440. query 'n1c4(Command: (L=List of moves) '
  441. b=result
  442. if b = 'l' | b = 'L' then sendfile 'pfiles:Kickboxing/Match.list'
  443. if b = 'q' | b = 'Q' then do
  444. transmit 'n1c7@ 'name' forfits the fight is over! 'mname' wins!'
  445. loses=loses+1
  446. quit=1
  447. call losesave
  448. call main
  449. end
  450. if b = "###PANIC" then call bye
  451. if b = '1' then call Mpunch
  452. if b = '2' then call Msidek
  453. if b = '3' then call Mjkick
  454. if b = '4' then call Mbfist
  455. if b = '5' then call Mfkick
  456. if b = '6' then do
  457. if pk=0 then do;transmit 'n1c2@ You are out of power kicks.';call mmatch!;end
  458. call Mpkick;end
  459. call MMatch!
  460.  
  461. Mpunch:
  462. transmit 'f1'
  463. randmpun=random(1,6,time('s'))
  464. if randmpun=1 then do
  465. transmit 'c5@ You swing at 'mname' and hit him hard!'
  466. mstr!=mstr!-1
  467. end
  468. if randmpun=2 then do
  469. transmit 'c5@ You swing at 'mname' and hit jack him good!'
  470. mstr!=mstr!-2
  471. end
  472. if randmpun=3 then do
  473. transmit 'c5@ You swing at 'mname' and miss him!'
  474. end
  475. if randmpun=4 then do
  476. transmit 'c5@ You swing at 'mname' and hit him, hit was no good!'
  477. end
  478. if randmpun=5 then do
  479. transmit 'c5@ You swing at 'mname' and miss him totally!'
  480. end
  481. if randmpun=6 then do
  482. transmit 'c5@ You swing at 'mname' and hit him direct!'
  483. mstr!=mstr!-2
  484. end
  485. call Mmoves
  486.  
  487. Mmoves:
  488. randmmove=random(1,7,time('s'))
  489. if randmmove=1 then do
  490. transmit 'n1c2* 'mname' does a jump kick and hit you hard!'
  491. str!=str!-2
  492. end
  493. if randmmove=2 then do
  494. transmit 'n1c2* 'mname' throws a punch at you at misses!'
  495. end
  496. if randmmove=3 then do
  497. transmit 'n1c2* 'mname' kicks at your side and hits lightly!'
  498. str!=str!-1
  499. end
  500. if randmmove=4 then do
  501. transmit 'n1c2* 'mname' kick at your waist and hits hard!'
  502. str!=str!-2
  503. end
  504. if randmmove=5 then do
  505. transmit 'n1c2* 'mname' kicks at your face and hits lightly!'
  506. str!=str!-1
  507. end
  508. if randmmove=6 then do
  509. transmit 'n1c2* 'mname' kicks at your face and misses!'
  510. end
  511. if randmmove=7 then do
  512. transmit 'n1c2* 'mname' hits you in the face pretty hard!'
  513. str!=str!-2
  514. end
  515. move=move+1
  516. call Mmatch!
  517.  
  518. MsideK:
  519. transmit 'f1'
  520. randside=random(1,3,time('s'))
  521. if randside=1 then do
  522. transmit 'c2@ You kick at 'mname'''s side and hit hard!'
  523. mstr!=mstr!-2
  524. end
  525. if randside=2 then do
  526. transmit 'c2@ You kick at 'mname'''s side and hit lightly!'
  527. mstr!=mstr!-1
  528. end
  529. if randside=3 then do
  530. transmit 'c2@ You miss 'mname'''s side completly!'
  531. end
  532. call MMoves
  533.  
  534. MjKick:
  535. transmit 'f1'
  536. randjump=random(1,3,time('s'))
  537. if randjump=1 then do
  538. transmit 'c5@ You do a jump kick and catch 'mname' in the mouth!'
  539. mstr!=mstr!-2
  540. end
  541. if randjump=2 then do
  542. transmit 'c5@ You do a jump kick and miss 'mname' completly!'
  543. end
  544. if randjump=3 then do
  545. transmit 'c5@ You do a jump kick and catch 'mname' lightly!'
  546. mstr!=mstr!-1
  547. end
  548. Call MMoves
  549.  
  550. MBfist:
  551. transmit 'f1'
  552. randfist=random(1,3,time('s'))
  553. if randfist=1 then do
  554. transmit 'c3@ You whip a back fist at 'mname' and hit him lightly!'
  555. mstr!=mstr!-1
  556. end
  557. if randfist=2 then do
  558. transmit 'c3@ You whip a back fist at 'mname' and hit him hard!'
  559. mstr!=mstr!-1
  560. end
  561. if randfist=3 then do
  562. transmit 'c3@ You whip a back fist at 'mname' and miss him!'
  563. end
  564. if randfist=4 then do
  565. transmit 'c3@ You whip a back fist at 'manme' and miss!'
  566. end
  567. call MMoves 
  568.  
  569. MFkick:
  570. transmit 'f1'
  571. randface=random(1,3,time('s'))
  572. if randface=1 then do
  573. transmit 'c2@ You kick at 'mname'''s face and miss!'
  574. end
  575. if randface=2 then do
  576. transmit 'c2@ You kick at 'mname'''s face and hit lightly!'
  577. mstr!=mstr!-1
  578. end
  579. if randface=3 then do
  580. transmit 'c2@ You kick at 'mname'''s face and hit hard!'
  581. mstr!=mstr!-2
  582. end
  583. call mmoves
  584. MPkick:
  585. transmit 'f1n1z7c2YOU HIT 'MNAME' WITH YOUR POWER KICK!z0'
  586. mstr!=mstr!-4
  587. pk=pk-1
  588. call mmoves
  589.  
  590. News:
  591. if champ=1 then do
  592. transmit 'n1c2* You are then new CHAMPION!b1w1b1'
  593. if ~exists('pfiles:Kickboxing/Fighting.News') then do
  594. call open(file,'pfiles:kickboxing/fighting.news',"W")
  595. call writeln file, ''name' took the title from 'champname' on 'time'';call close(file);end
  596. if exists('pfiles:kickboxing/fighting.news') then do
  597. call open(file,'pfiles:Kickboxing/Fighting.news',"W")
  598. call writeln file, 'n1'name' took the title from 'champname' on 'time''
  599. call close(file);end
  600. call open(file,'pfiles:kickboxing/Champ.Dat',"W")
  601. call writeln file, name;call writeln file, wins;call writeln file, loses
  602. call writeln file, str;call close(file);call main
  603. end
  604. if champ~=1 then do;call open(file,sgame,"W")
  605. call writeln file, mwins;call writeln file, mloses;call writeln file, mstr;call writeln file, saying
  606. call close(file)
  607. end
  608. transmit 'n1c7Press any key:g1'
  609. transmit 'n1c3The news casters are here waiting for your comment, please'
  610. transmit 'leave a message on how this fightr was! How was this fight?'
  611. query '> '
  612. c=result
  613. if c = '' then c='No comment'
  614. if ~exists('Pfiles:Kickboxing/Fighting.News') then do
  615. call open(file,'Pfiles:Kickboxing/Fighting.News',"W")
  616. call writeln file, 'n1'name' fought: 'mname' on 'time' and WON!' 
  617. call writeln file, 'Heres his comment about the fight:'
  618. call writeln file, c;call close(file)
  619. return
  620. end
  621. call open(file,'Pfiles:Kickboxing/Fighting.News',"A")
  622. call writeln file, 'n1'name' fought: 'mname' on 'time' and WON!' 
  623. call writeln file, 'Heres his comment about the fight:'
  624. call writeln file, c;call close(file)
  625. return
  626. end
  627.  
  628. Losesave:
  629. call open(file,sname,"W")
  630. call writeln file, mwins;call writeln file, mloses;call writeln file, mstr;call writeln file, saying
  631. call close file
  632. if quit=1 then do
  633. if ~exists('pfiles:Kickboxing/Fighting.News') then do
  634. call open(file,'Pfiles:Kickboxing/Fighting.News',"W")
  635. call writeln file, 'n1'name' forfited againist 'mname' in round 'rou'';call close(file)
  636. return
  637. end
  638. call open(file,'pfiles:Kickboxing/Fighting.News',"A")
  639. call writeln file, 'n1'name' forfited againist 'mname' in round 'rou'';call close(file)
  640. return
  641. end
  642. if ~exists('pfiles:Kickboxing/Fighting.News') then do
  643. call open(file,'Pfiles:Kickboxing/Fighting.News',"W")
  644. call writeln file, 'n1'name' was knock out by 'mname' in round 'rou'';call close(file)
  645. return
  646. end
  647. call open(file,'Pfiles:Kickboxing/Fighting.News',"A")
  648. call writeln file, 'n1'name' was knocked out by 'mname' in round 'rou'';call close(file)
  649. return
  650. end
  651.  
  652. Classchec:
  653. if str >49 then class='Fly Weight';if str >59 then class='Mid Weight';if str >69 then class='Hev Weight'
  654. return
  655.  
  656. GetChamp:
  657. champ=1
  658. call open(file,'pfiles:Kickboxing/Champ.dat',"R")
  659. mname=readln(file);mwins=readln(file);mloses=readln(file);mstr=readln(file)
  660. call close(file)
  661. transmit 'n1c3'champname'''s current records:n2c2Wins  : 'mwins'  Loses : 'mloses''
  662. query 'n1c7Do you want to fight him? ';cc=upper(result)
  663. if cc = 'Y' then call mmatch
  664. if cc = '' then call Getchamp
  665. if cc = 'N' then call main
  666. call getchamp
  667. end
  668.  
  669. Viewother:
  670. transmit 'n1c5@ View other players stats'
  671. filen='Pfiles:Kickboxing/Fighters.List';call listtr
  672. query 'n2c4(c7Command/L=List Users/Q=Quit to mainc4> c1'
  673. x=result
  674. if x='L' | x='l' then call listtr
  675. if x='Q' | x='q' then do
  676. call main;end
  677. if x='' then call viewother
  678. if x='###PANIC' then call bye
  679. if x<1 | x>numplayers then call viewother
  680. filename='pfiles:Kickboxing/Fighters/'player.x''
  681. if ~exists(filename) then do
  682. transmit 'n1c3@ No such user on the name.';return;end
  683. fighter=player.x
  684. call open(file,'pfiles:kickboxing/fighters/'fighter'',"R")
  685. cwins=readln(file);closes=readln(file);cclass=readln(file);ctrwins=readln(file)
  686. ctrloses=readln(file);cstr=readln(file);call close(file)
  687. transmit 'n1c7'fighter'''s Record file:'
  688. transmit 'n1c2Wins : c1'cwins'            c2Loses   : c1'closes''
  689. transmit 'c2Class: c1'cclass'   c2Strength: c1'cstr''
  690. transmit 'c4---------Training Records-----------'
  691. transmit '      c2Wins : c1'ctrwins'  c2Loses : c1'ctrloses''
  692. transmit 'n1c5[Press a key]g1'
  693. call viewother;end
  694.  
  695. LogShorten:
  696. if ~exists('pfiles:Kickboxing/Fighting.News') then return
  697. call open(File,'Pfiles:Kickboxing/Fighting.News','R')
  698. Lines=0
  699. do until eof(File)=1
  700. Lines=Lines+1
  701. HLine.Lines=readln(File)
  702. end
  703. call close File
  704. if Lines>22 then do
  705. call open(File,'Pfiles:Kickboxing/Fighting.News','W')
  706. MaxLine=Lines
  707. MinLine=MaxLine-19
  708. do i=MinLine to MaxLine;if HLine.i~="" then call writeln(File,HLine.i);end
  709. call close File
  710. end
  711. return
  712.  
  713.